package lark

import "os"

type LarkConf struct {
	LarkBotURL    string `json:",default=https://127.0.0.1/open-apis/bot/v2/hook/12345"`
	LarkBotSecret string `json:",optional"`
}

func (c *LarkConf) ReplaceEnv() {
	// LarkBotURL
	larkBotURL := os.Getenv("LarkBotURL")
	if larkBotURL != "" {
		c.LarkBotURL = larkBotURL
	}

	// LarkBotSecret
	larkBotSecret := os.Getenv("LarkBotSecret")
	if larkBotSecret != "" {
		c.LarkBotSecret = larkBotSecret
	}
}
